A good answer might be:

The complete program is given below.

Complete Minimum-finding Program

As with the maximum-finding program, you should run this program with various sets of data and confirm that it works with all of them.

class MinAlgorithm
{

  public static void main ( String[] args ) 
  {

    int[] array =  { -20, 19, 1, 5, -1, 27, 19, 5 } ;
    int   min;

    // initialize the current minimum
    min = array[ 0 ];

    // scan the array
    for ( int index=0; index < array.length; index++ )
    { 
      if ( array[ index ] < min )

        min = array[ index ] ;

    }
      
    System.out.println("The minimum of this array is: " + min );
  }
}      

QUESTION 12:

Here is a list of numbers:

1.2, 2.8, 1.0
Compute the sum of the numbers.